home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 November: Tool Chest / Dev.CD Nov 96 TC / Dev.CD Nov 96 TC.toast / Sample Code / Text / SimpleText Sample / GXFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  2.7 KB  |  97 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        GXFile.h
  3.  
  4.     Contains:    GX print file support for simple text application
  5.  
  6.     Version:    SimpleText 1.4 or later
  7.  
  8. ** Copyright 1993-1996 Apple Computer. All rights reserved.
  9. **
  10. **    You may incorporate this sample code into your applications without
  11. **    restriction, though the sample code has been provided "AS IS" and the
  12. **    responsibility for its operation is 100% yours.  However, what you are
  13. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  14. **    after having made changes. If you're going to re-distribute the source,
  15. **    we require that you make it clear in the source that the code was
  16. **    descended from Apple Sample Code, but that you've made changes.
  17.  
  18. */
  19.  
  20. #include "SimpleText.h"
  21.  
  22. #define kGotoPageDialogID         kGXBaseID
  23.  
  24. #define kLabelString            kGXBaseID
  25. #define kPageControlStrings        kGXBaseID+1
  26.     #define iGoToPageString            1
  27.     
  28. #define kPageControlPlain        kGXBaseID
  29. #define kPageControlRight        kPageControlPlain+1
  30. #define kPageControlLeft        kPageControlPlain+2
  31.  
  32. #define kZoomControlPlain        kGXBaseID+3
  33. #define kZoomControlRight        kZoomControlPlain+1
  34. #define kZoomControlLeft        kZoomControlPlain+2
  35.  
  36. #define kGXPopUpMenu            kGXBaseID
  37.     #define i50                        1
  38.     #define i100                    2
  39.     #define i112                    3
  40.     #define i150                    4
  41.     #define i200                    5
  42.     #define i400                    6
  43.     #define iScaleToFit                8
  44.     #define iDontShowMargins        10
  45.     
  46. #define kGXToolMenu                kGXBaseID+1
  47.     #define kIconBase                256
  48.     #define kSelectionTool            1
  49.     #define kRedMarkerTool            2
  50.  
  51. #ifndef REZ
  52.     
  53.     struct GXDataRecord
  54.         {
  55.         WindowDataRecord        w;
  56.         
  57.         gxViewPort                parentViewPort;        // viewPort in the window
  58.         gxViewPort                childViewPort;        // viewPort inset from the other
  59.         
  60.         gxPrintFile                thePrintFile;
  61.         short                    printFileRefNum;
  62.         
  63.         long                    numberOfPages;        // # of pages in this document
  64.         long                    currentPage;        // currently visible page #
  65.         Fixed                    zoomFactor;            // current zoom factor
  66.         Boolean                    dontShowMargins;    // don't show page margins
  67.  
  68.         // mode when user clicks in content
  69.         short                    contentClickMode;
  70.  
  71.         // current selection information
  72.         Rect                    selectionRectangle;
  73.         short                    patternPhase;
  74.         
  75.         // filled in during drag to avoid multiple shape traversals
  76.         gxShape                    tempDragShape;
  77.         
  78.         // current page and format information
  79.         gxShape                    currentPageShape;
  80.         gxFormat                currentPageFormat;
  81.  
  82.         // filled in during shape traverse to locate the desired starting "index"
  83.         long                    tempSearchIndex;
  84.         
  85.         // fields for currently selected item in the search
  86.         long                     currentShapeIndex;
  87.         long                    currentShapeStart;
  88.         long                    currentShapeEnd;
  89.         gxShape                 currentSelectionShape;
  90.         gxMapping                currentSelectionMapping;
  91.         
  92.         // fields for annotation pictures
  93.         gxShape                    ** pageAnnotations;
  94.         };
  95.     typedef struct GXDataRecord GXDataRecord, *GXDataPtr;    
  96. #endif
  97.